import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class Demo5 {
    public static void main(String[] args) throws IOException {
        //字节流读取
        /*
        输入流 读入数据
        输出流 写出数据
         */
        try(InputStream inputStream=new FileInputStream("d:/test.txt"))
        {
            while(true)
            {
                int b=inputStream.read();
                if(b==-1)
                {
                    break;
                }
                //System.out.println(b);
                System.out.printf("%x\n",b);
            }
        }


    }
}
